package com.lz.utils;

/**
 * 计算价格工具类
 * Created by Administrator on 2018/8/31 0031.
 */
public class MathUtil {

    private static final Double MONEY_RANGE = 0.01;
    /**
     * 比较两个金额是否相等
     * @param d1
     * @param d2
     * @return
     */
    public static Boolean equ(Double d1,Double d2){
        double abs = Math.abs(d1 - d2);
        if (abs < MONEY_RANGE){
            return true;
        } else {
            return false;
        }
    }
}
